In prolog I tried to write a predicate which takes three parameters
first one is a sublist of second one , third one is the sorted one which includes first parameter and then second with respect to first one.
find([a ,c,d] , [a,b,c,d,e,f], Result).
Result should be [a,c,d,b,e,f]
.
My code is not working well
find(First,Second,X):-
findall(K, (member(K,Second),
\+member(K,First),
append(First,K)), X).